using System;
using System.Globalization;
using System.Windows.Data;

namespace RobotPratolSolution.ViewModels
{
    public class EnumDisplayConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is Enum enumValue)
            {
                return GetDisplayName(enumValue);
            }
            return value?.ToString();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        private string GetDisplayName(Enum value)
        {
            // 这里可以添加具体的显示名称逻辑
            return value.ToString();
        }
    }
}